package com.tmp;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

/**
 * @author: chenhs
 * @date: Created in 15:39 2020/8/27
 **/
public class ListTest {

    public static void main(String[] args) {
//        Integer [] str ={1,3,2,4,5,6,2};
//        List<Integer> integers = Arrays.asList(str);
//        List<Integer> list =new ArrayList<>();
//        list.addAll(integers);
//        list.removeIf(a->a==2 || a==1);
//        System.out.println(list);



        String tenDistricts = "4028e41b4a85ded8014a8603839c0c90,4028e41b4a85ded8014a8603e06d0c91,4028e41b4a85ded8014a860438d40c92,4028e41b4a85ded8014a860489a40c93";
        String ex = "4028e41b4a85ded8014a8603839c0c90,4028e41b4a85ded8014a860489a40c93";


        String [] pstr = tenDistricts.split(",");
        String [] sstr = ex.split(",");


        List<String> tmpList = Arrays.asList(pstr);
        List<String> pstrList = new ArrayList<>(tmpList);

        for (String s : sstr) {
            pstrList.removeIf(a->a.equals(s));
        }

        System.out.println(pstrList.toString().replace("[","").replace("]","").replace(", ", ","));
    }

}
